<?php

use Phinx\Migration\AbstractMigration;

class AddColumnFrameWorkContractIdInTenantTable extends AbstractMigration
{
    public function up()
    {
        $this->table("tenant")
            ->addColumn('framework_agreement_contract_id', 'string', [
                'default' => '',
                'limit' => 32,
                'comment' => 'FDD框架协议合同id',
            ])
            ->addColumn('framework_agreement_status', 'enum', [
                'values' => 'to_be_submitted,wait_for_sign,signed',
                'default' => 'to_be_submitted',
                'comment' => 'FDD框架协议签订状态'
            ])
            ->save();
    }

    public function down()
    {
        $this->table("tenant")->removeColumn("framework_agreement_contract_id")->removeColumn("framework_agreement_status")->save();
    }
}
